package com.example.javademo.cglib;

import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description :
 * @Author 北风
 * @Date Created in 2021/10/19 17:56
 */

@Component
@Aspect
public class TestAop {

    /**
     * com.example.demo.cglib.TargetDataSource 为自定义注解的全限定名
     */
    @Pointcut("@within(com.example.javademo.cglib.TargetDataSource)")
    public void pointCutOne(){}

    @Before("pointCutOne()")
    public void beforeByClass() {
        System.out.println("开始代理");
    }

}
